package com.factory.factorymethod.order;

import com.factory.factorymethod.pizzapojo.LDCheesePizza;
import com.factory.factorymethod.pizzapojo.LDPepperPizza;
import com.factory.factorymethod.pizzapojo.Pizza;


/**
 * @author 薛虎
 * @date 2020/12/23 13:29
 */
public class LDOrderPizza extends OrderPizza {
    @Override
    public Pizza createPizza(String orderType) {

        Pizza pizza = null;
        if (orderType.equals("cheese")) {
            pizza = new LDCheesePizza();
        } else if (orderType.equals("pepper")) {
            pizza = new LDPepperPizza();
        }

        return pizza;


    }
}
